package com.project.restaurant.common.dto;

public enum RestaurantState {
    CLOSE(0,"休业中"),
    OPEN(1,"营业中");

    private String desc;
    private int  restaurantState;
    RestaurantState(int restaurantState,String desc){
        this.restaurantState = restaurantState;
        this.desc = desc;
    }

    public static RestaurantState getRestaurantState(int state){
        RestaurantState[] values = RestaurantState.values();
        for(RestaurantState v :values){
            if(v.getRestaurantState() == state){
                return v;
            }
        }
        return null;
    }

    public String getDesc() {
        return desc;
    }

    public int getRestaurantState() {
        return restaurantState;
    }
}
